\begin{problem}{Permutation Values}{values.in}{values.out}{2 seconds}{}{}

    	You will be given a group of integer ranges. 
    	Each range is given by the lower and upper inclusive bounds for 
    	it. None of the ranges will overlap. The total 
    	group of numbers used in this problem will be the 
    	combination of the ranges given in lows and highs.

You will also be given a number $V$ and an
array $T_i$.
Assume you listed 
all possible permutations of the given group of 
numbers in ascending lexicographical order (no repeated 
permutations). Find the permutation $A$ 
that is in position $V$ lexicographically. 
To check you program works correctly, you will be required
to output $A_{T_i}$.
$V$ is 0-based position, and indexes $T_i$ are also 0-based.

In a lexicographical ordering, permutations are ordered by their 
first elements, with ties broken by their second elements, 
further ties broken by their third elements, and so forth. 

If $V$ is greater than the total possible number of lexicographical 
orderings (without repeats) Q, then 
use $V\bmod Q$ instead of $V$.
 

\InputFile

The first line contains the number of ranges $N$ ($1\le N\le 50$),
the number of elements in $T_i$ --- $M$ ($1\le M\le 50$),
and the number $V$ ($0\le V\le 2^{63}-1$).
The next $N$ lines contains ranges given in form $l_i$\ $r_i$,
where $-2^{31}\le l_i\le r_i\le 2^{31}-1$. The last line contains $M$ numbers,
each of them containing one $T_i$. All $T_i$ will be non-negative
and less than total amount of numbers in all ranges combined.
No two ranges will overlap.

\OutputFile

Output $A_{T_i}$ as described above. Separate numbers by spaces.

\Example

{\scriptsize%
\begin{examplewide}
\exmp{
1 4 0
1 4
0 1 2 3
}{
1 2 3 4
}%
\exmp{
1 3 5
1 3
0 1 2
}{
3 2 1
}%
\exmp{
2 13 1000000
1 5
16 20
0 1 2 3 4 5 6 7 8 9 1 2 3
}{
3 18 19 4 20 2 16 17 1 5 18 19 4
}%
\exmp{
1 5 100000000000001
1 5
0 1 2 3 4
}{
2 4 5 3 1
}%
\exmp{
1 1 999999
9 9
0
}{
9
}%
\exmp{
3 3 100000000000009
0 99
-100 -11
101 100000000
4 100000087 7
}{
-96 99999993 -93
}%
\end{examplewide}}

\end{problem}
